package com.panshi.servers.impl;

import com.panshi.api.bean.AnswerHDBean;
import com.panshi.api.util.PageSizeVO;
import com.panshi.mapper.AnswerHDMapper;
import com.panshi.pojo.AnswerHDVO;
import com.panshi.servers.AnswerHDServers;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author XiaoWangYa
 * @version 1.0
 * @date 2020/8/9 0009 下午 10:10
 */
@Service
@Api("回答Servers层")
public class AnswerHDServersImpl implements AnswerHDServers {

    @Autowired
    private AnswerHDMapper answerHDMapper;

    @Override   // 新增回答数据
    public void addAnswerHDInfo(AnswerHDBean answerHDBean) {
        answerHDMapper.addAnswerHDInfo(answerHDBean);
    }

    @Override   // 删除回答数据
    public void deleteAnswerHDInfo(int id) {
        answerHDMapper.deleteAnswerHDInfo(id);
    }

    @Override   // 查询指定问答下回答 and 指定用户回答数据
    public List<AnswerHDVO> queryAssignHDQuestionAnswerInfo(PageSizeVO pageSizeHDBean) {
        return answerHDMapper.queryAssignHDQuestionAnswerInfo(pageSizeHDBean);
    }

    @Override   // 修改回答
    public void updateAnswerHDInfo(AnswerHDBean answerHDBean) {
        answerHDMapper.updateAnswerHDInfo(answerHDBean);
    }
}
